Skip to content

Add page to generate newsletter#2804

Draft
cqnykamp wants to merge 18 commits intoDoenet:mainfrom
cqnykamp:email-friendly-newsletter-format
Draft

Add page to generate newsletter#2804
cqnykamp wants to merge 18 commits intoDoenet:mainfrom
cqnykamp:email-friendly-newsletter-format

Conversation

@cqnykamp
Copy link
Copy Markdown
Contributor

@cqnykamp cqnykamp commented Feb 17, 2026

NOTE: It's unclear whether we want to merge this to main or not. There are most likely better ways to construct a newsletter.

Adds a new hidden page at /blog/generate-newsletter that lets us download email-friendly HTML for recent blog posts.

In order to display excerpts instead of full posts, each post should have the marker

<!-- more -->

where the excerpt should end.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a newsletter-generation page to the Astro blog app that compiles recent blog posts into email-friendly HTML, using a <!-- more --> marker to limit excerpts.

Changes:

  • Added excerpt extraction + email-cleaning/styling utilities.
  • Added a /blog/generate-newsletter page that renders posts, extracts excerpts, rewrites URLs, and supports download/copy.
  • Updated the markdown style guide to document the <!-- more --> excerpt marker.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.

File Description
blog/src/utils/excerpt.ts New helpers for excerpt extraction and email-oriented HTML cleanup/styling.
blog/src/pages/generate-newsletter.astro New newsletter generator UI + client-side processing and export (download/copy).
blog/src/layouts/NewsletterPost.astro Added an email-friendly post layout (currently appears unused).
blog/src/content/markdown-style-guide.md Adds <!-- more --> marker example to the style guide.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread blog/src/pages/generate-newsletter.astro Outdated
Comment thread blog/src/pages/generate-newsletter.astro Outdated
Comment thread blog/src/pages/generate-newsletter.astro Outdated
Comment thread blog/src/pages/generate-newsletter.astro Outdated
Comment thread blog/src/pages/generate-newsletter.astro Outdated
Comment thread blog/src/utils/excerpt.ts Outdated
Comment thread blog/src/pages/generate-newsletter.astro
Comment thread blog/src/pages/generate-newsletter.astro Outdated
Comment thread blog/src/pages/generate-newsletter.astro Outdated
Comment thread blog/src/pages/generate-newsletter.astro Outdated
@cqnykamp cqnykamp marked this pull request as draft February 18, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants